/*
 * int.c
 *
 *  Created on: Oct 29, 2012
 *      Author: andrey
 */
#include "ch.h"
#include "hal.h"
#include "test.h"
#include "lis302dl.h"
#include "chprintf.h"
#include "drawing.h"
#include "touchpad.h"

#include "stm32f4xx_syscfg.h"
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_exti.h"


volatile int externalInterrupt = 0;
volatile int externalInterrupt2 = 0;

CH_IRQ_HANDLER(Vector58) { // EXTI0 external interrupt handler
	CH_IRQ_PROLOGUE();

	externalInterrupt++;
	externalInterrupt2++;

	EXTI ->PR |= 0x1; // clear interrupt
	CH_IRQ_EPILOGUE();
}

CH_IRQ_HANDLER(Vector5C) { // EXTI1 external interrupt handler
	CH_IRQ_PROLOGUE();

	EXTI ->PR |= 0x2; // clear interrupt
	CH_IRQ_EPILOGUE();
}

